package org.sky.cloud.common.notify.publisher;


import org.sky.cloud.common.lifecycle.Closeable;
import org.sky.cloud.common.notify.Event;
import org.sky.cloud.common.notify.listener.Subscriber;

public interface EventPublisher extends Closeable {

    void init(Class<?> type, int queueSize);


    void addSubscriber(Subscriber subscriber);


    void removeSubscriber(Subscriber subscriber);


    boolean publish(Event event);


    void notifySubscriber(Subscriber subscriber, Event event);
}
